class Person {
  // 成员属性:声明成员属性
  name: string = ""
  age: number = 0
  constructor(name: string, age: number) {
    this.name = name
    this.age = age
  }
  eating() {
    this.name + " eating"
  }
  running() {
    this.name + " running"
  }
}

const p1 = new Person("why", 18)
const p2 = new Person("kobe", 30)
console.log(p1.name, p1.age)